Field of the Invention
The present inventions relate to image processing, and particularly relate to a technology for demosaicing by interpolating a color signal missing in each pixel in a polychrome image signal.
Description of the Related Art
In the past, a color filter having a Bayer pattern as illustrated in FIG. 17 has been applied in a single-plate image pickup device such as a CCD and a CMOS sensor. In this case, such a color filter may generally be a filter for three primary colors of Red, Green, and Blue or three complementary colors of Cyan, Magenta, and Yellow.
However, because a signal corresponding to one color in each pixel may be acquired by using the Bayer pattern, a process is performed for demosaicing (interpolating) color signals of the other two colors missing in each pixel. Many demosaicing methods have been known in the past, and basic demosaicing methods may include bilinear and bicubic interpolations, for example.
Though a good interpolation result may be acquired from an image containing many low frequency components by a bilinear or bicubic interpolation, a line and color, called a spurious resolution and a false color (color moire), which do not exist in an actual subject may occur in an image containing high frequency components. Such a spurious resolution and a false color may occur because of demosaicing by using pixels in a different direction from an edge direction that a subject image originally has.
Accordingly, a method has been proposed which may sufficiently inhibit occurrence of a spurious resolution and a false color by demosaicing by using pixels along an edge direction that a subject image originally has. Such demosaicing methods using pixels along an edge direction may be roughly divided into two methods. Japanese Patent Laid-Open No. 2008-035470 proposes a method including identifying an edge direction by using peripheral pixels and performing an interpolation along the edge instead of interpolation across the edge.
Japanese Patent Laid-Open No. 2008-035470 discloses a second interpolation method including first performing an interpolation in each direction to generate several kinds of interpolation results and then determining and selecting which direction used for interpolation may provide an appropriate result. The determination of the appropriateness of an interpolation direction may be based on an evaluation value indicating a peripheral similarity which is neighborhood homogeneity or uniformity of peripheral pixels including a pixel to be interpolated. A direction having a high homogeneity may be determined, and may be selected as the edge direction.
However, the methods disclosed in Japanese Patent Laid-Open No. 2008-035470 may not provide an appropriate evaluation value indicating homogeneity or uniformity near a resolution limit where a pixel pitch of an imaging sensor and a pitch of a fine part of a subject are close or matched. Thus, an appropriate interpolation direction may not be selected, and a spurious resolution may therefore occur.